package com.jiayi.data.converter;

import java.util.Date;
import com.jiayi.data.entity.schema.JiayiAboutUs;
import com.jiayi.data.entity.excel.JiayiAboutUsExcel;
import com.jiayi.data.entity.bo.JiayiAboutUsBO;
import com.jiayi.data.entity.request.JiayiAboutUsRequest;
import com.jiayi.data.entity.request.JiayiAboutUsSearchRequest;
import com.jiayi.data.entity.request.JiayiAboutUsSearchPageRequest;
import com.jiayi.data.entity.response.JiayiAboutUsDTO;
import org.springframework.stereotype.Component;

/**
 * 关于我们配置对象 Converter
 *
 * @author zzx
 * @date 2024-11-26
 */
@Component
public class JiayiAboutUsConverter {

    public JiayiAboutUs convertToJiayiAboutUs(JiayiAboutUsBO from) {
        if (from == null) {
            return null;
        }
        JiayiAboutUs to = new JiayiAboutUs();
        to.setId(from.getId());
        to.setKey(from.getKey());
        to.setName(from.getName());
        to.setValue(from.getValue());
        to.setRemark(from.getRemark());
        to.setCreateBy(from.getCreateBy());
        to.setCreateTime(from.getCreateTime());
        return to;
    }

    public JiayiAboutUsBO convertToJiayiAboutUsBO(JiayiAboutUsSearchRequest from) {
        if (from == null) {
            return null;
        }
        JiayiAboutUsBO to = new JiayiAboutUsBO();
            to.setId(from.getId());
            to.setKey(from.getKey());
            to.setName(from.getName());
            to.setValue(from.getValue());
            to.setRemark(from.getRemark());
            to.setCreateBy(from.getCreateBy());
            to.setCreateTime(from.getCreateTime());
        return to;
    }

    public JiayiAboutUsBO convertToJiayiAboutUsBO(JiayiAboutUsRequest from) {
        if (from == null) {
            return null;
        }
        JiayiAboutUsBO to = new JiayiAboutUsBO();
            to.setId(from.getId());
            to.setKey(from.getKey());
            to.setName(from.getName());
            to.setValue(from.getValue());
            to.setRemark(from.getRemark());
            to.setCreateBy(from.getCreateBy());
            to.setCreateTime(from.getCreateTime());
        return to;
    }

    public JiayiAboutUsBO convertToJiayiAboutUsBO(JiayiAboutUs from) {
        if (from == null) {
            return null;
        }
        JiayiAboutUsBO to = new JiayiAboutUsBO();
        to.setId(from.getId());
        to.setKey(from.getKey());
        to.setName(from.getName());
        to.setValue(from.getValue());
        to.setRemark(from.getRemark());
        to.setCreateBy(from.getCreateBy());
        to.setCreateTime(from.getCreateTime());
        return to;
    }

    public JiayiAboutUs convertToJiayiAboutUs(JiayiAboutUsRequest from) {
        if (from == null) {
            return null;
        }
        JiayiAboutUs to = new JiayiAboutUs();
        to.setId(from.getId());
        to.setKey(from.getKey());
        to.setName(from.getName());
        to.setValue(from.getValue());
        to.setRemark(from.getRemark());
        to.setCreateBy(from.getCreateBy());
        to.setCreateTime(from.getCreateTime());
        return to;
    }

    public JiayiAboutUs convertToJiayiAboutUs(JiayiAboutUsSearchPageRequest from) {
        if (from == null) {
            return null;
        }
        JiayiAboutUs to = new JiayiAboutUs();
            to.setId(from.getId());
            to.setKey(from.getKey());
            to.setName(from.getName());
            to.setValue(from.getValue());
            to.setRemark(from.getRemark());
            to.setCreateBy(from.getCreateBy());
            to.setCreateTime(from.getCreateTime());
        return to;
    }

public JiayiAboutUs convertToJiayiAboutUs(JiayiAboutUsSearchRequest from) {
        if (from == null) {
            return null;
        }
        JiayiAboutUs to = new JiayiAboutUs();
            to.setId(from.getId());
            to.setKey(from.getKey());
            to.setName(from.getName());
            to.setValue(from.getValue());
            to.setRemark(from.getRemark());
            to.setCreateBy(from.getCreateBy());
            to.setCreateTime(from.getCreateTime());
        return to;
    }
    public JiayiAboutUsDTO convertToJiayiAboutUsDTO(JiayiAboutUsBO from) {
        if (from == null) {
            return null;
        }
        JiayiAboutUsDTO to = new JiayiAboutUsDTO();
        to.setId(from.getId());
        to.setKey(from.getKey());
        to.setName(from.getName());
        to.setValue(from.getValue());
        to.setRemark(from.getRemark());
        to.setCreateBy(from.getCreateBy());
        to.setCreateTime(from.getCreateTime());
        return to;
    }

    public JiayiAboutUsDTO convertToJiayiAboutUsDTO(JiayiAboutUs from) {
        if (from == null) {
            return null;
        }
            JiayiAboutUsDTO to = new JiayiAboutUsDTO();
            to.setId(from.getId());
            to.setKey(from.getKey());
            to.setName(from.getName());
            to.setValue(from.getValue());
            to.setRemark(from.getRemark());
            to.setCreateBy(from.getCreateBy());
            to.setCreateTime(from.getCreateTime());
        return to;
    }

    public JiayiAboutUsExcel convertToJiayiAboutUsExcel(JiayiAboutUs from) {
        if (from == null) {
            return null;
        }
            JiayiAboutUsExcel to = new JiayiAboutUsExcel();
            to.setId(from.getId());
            to.setKey(from.getKey());
            to.setName(from.getName());
            to.setValue(from.getValue());
            to.setRemark(from.getRemark());
            to.setCreateBy(from.getCreateBy());
            to.setCreateTime(from.getCreateTime());
        return to;
    }


}